<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>申请状态查询</title>
	</head>
	<body>
		<form action="<c:url value='/skositedo/apply.do'/>" method="post">
			<table class="table-layout">
				<tr class="tr-thead">
					<th rowspan="2">
						序号
					</th>
					<th rowspan="2">
						提交日期
					</th>
					<th colspan="3">
						申请投资区域
					</th>
					<th rowspan="2">
						单位全称
					</th>
					<th rowspan="2">
						状态
					</th>
					<th rowspan="2">
						操作
					</th>
				</tr>
				<tr class="tr-thead">
					<th>
						省
					</th>
					<th>
						市
					</th>
					<th>
						县/区
					</th>
				</tr>
				<logic-el:iterate name="page" property="result" id="applicationVo" indexId="index">
					<tr class="<c:if test="${index % 2 == 0}">tr-odd</c:if><c:if test="${index % 2 == 1}">tr-even</c:if>">
						<td>
							<c:out value="${index + 1}" />
							&nbsp;
						</td>
						<td>
							<c:out value="${applicationVo.submitDate}" />
							&nbsp;
						</td>
						<td>
							<logic:iterate id="prov" name="provinces">
								<c:if test="${prov.code == applicationVo.provinceId}">
									<c:out value="${prov.name}" />
								</c:if>
							</logic:iterate>
							&nbsp;
						</td>
						<td>
							<logic:iterate id="city" name="cities">
								<c:if test="${city.code == applicationVo.cityId}">
									<c:out value="${city.name}" />
								</c:if>
							</logic:iterate>
							&nbsp;
						</td>
						<td>
							<logic:iterate id="dist" name="districts">
								<c:if test="${dist.code == applicationVo.districtId}">
									<c:out value="${dist.name}" />
								</c:if>
							</logic:iterate>
							&nbsp;
						</td>
						<td>
							<c:out value="${applicationVo.corp}" />
							&nbsp;
						</td>
						<td>
							<c:if test='${"0" == applicationVo.isSubmitted}'>草稿</c:if>
							<c:if test='${"1" == applicationVo.isSubmitted}'>已提交</c:if>
							&nbsp;
						</td>
						<td>
							<c:if test='${"1" != applicationVo.isSubmitted}'>
								<a href="<c:url value='apply.do?method=edit&id=${applicationVo.applyId}&regionId=${applicationVo.regionId}'/>">修改</a>&nbsp;
							</c:if>
							<c:if test='${"1" == applicationVo.isSubmitted}'>
								<a href="<c:url value='apply.do?method=download&id=${applicationVo.applyId}&regionId=${applicationVo.regionId}'/>">下载</a>
							</c:if>
						</td>
					</tr>
				</logic-el:iterate>
			</table>
			<page:page name="page" />
		</form>
	</body>
</html>
